package ui.shell;

import java.io.InputStream;
import java.util.Scanner;

public class AsyncStreamReader {
	
	private Scanner scan ;

	public AsyncStreamReader(InputStream is) {
		this.scan = new Scanner (is) ;
	}
	
	public synchronized int readInt () {
		return this.scan.nextInt() ;
	}
	
	public synchronized String readLine () {
		return this.scan.nextLine();
	}

	public synchronized String readNext () {
		return this.scan.next () ;
	}
	
}
